#include<memory>
#include<string>
#include"HttpServer.hpp"
#include"log.hpp"

using namespace std;

void Usage(string proc){
    cout<<"Usage:\n\t"<<proc<<" port"<<endl;
}


int main(int argc,char*argv[]){
    
   
   
    if(argc!=2){
        Usage(argv[0]);
        exit(4);
    }
    int port=stoi(argv[1]);
    shared_ptr<Httpserver> http_svr(new Httpserver(port));
    http_svr->InitServer();
    http_svr->Loop();
    
    
    return 0;

}